<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateVisitHistory extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('visit_history', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->default(0);
            $table->integer('seller_id')->default(0);
            $table->integer('today_visit')->default(0)->comment('当日最新访问量');
            $table->integer('order_visit')->default(0)->comment('订单新增的');
            $table->integer('refresh_visit')->default(0)->comment('刷新新增的');
            $table->integer('total_visit')->default(0)->comment('当日总访问量');
            $table->date('current_date')->comment('日期');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('visit_history');
    }
}
